<template>
  <div id="guamailist"> 


          <el-table :data="datalist" style="width: 100%" :height="dtheight" :header-cell-style="{background:'#4F81BC',color:'white'}"
           :row-class-name="tableRowClassName"  :border="true" @sort-change="sortFun">

                 <el-table-column label="挂卖时间"  align='center' width="180">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.time }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="果种编号"  align='center' width="230">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.pid }}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="果种名称"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.title }}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="用户名"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.nickname }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="手机号"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.telphone }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="果种价值"  align='center'  sortable="custom" >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.price }}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="状态"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span v-if="scope.row.is_init == 0">不是初始</span>
                        <span v-if="scope.row.is_init == 1">
                            <span v-if="scope.row.super_operate == 0">是初始</span>
                            <span v-if="scope.row.super_operate == 1">不是初始</span>
                        </span>
                    </template>
                </el-table-column>
                <el-table-column label="信用积分"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.credit_score }}</span>
                    </template>
                </el-table-column>





  
            </el-table>  


            



   </div>
</template>

<script>

export default {
   name: 'guamailist',
   props:{
      datalist:{  
        //type:Array,
       default:()=>[]
     },
  },
  data () {
    return {
        dtheight:'500',  //窗口高度
    }
  },
   components:{

  },
  created(){
     this.dtheight = window.innerHeight - 253
      
  },
  mounted (){
    
  },
  methods: {
     sortFun(column, prop, order ){
         if(column.order == "ascending") {
               this.$emit('up_list_fun_sort',2)
         } else if(column.order == "descending") {
               this.$emit('up_list_fun_sort',1)
         }else{
               this.$emit('up_list_fun_sort',0)
         }
         
     }

  }
}
</script>


<style scoped>
.imga>>>.el-icon-circle-close {
      color: white;
    }
</style>